<?php
include_once( 'function.php' );
check_login();

$tag = v('tag');
if( $tag == '' ) $tag = 'index';

$tag_file = 'pages/' . md5( $tag ) . '.data.txt';
$content = stripslashes(v('Rikitext'));

if( $content )
	file_put_contents( $tag_file , $content );
	
header('Location: index.php?tag=' . urlencode($tag));
?>
<script>location='Location: index.php?tag=<?php echo urlencode($tag)?>'</script>
<a href="index.php?tag=<?php echo urlencode($tag)?>">Redirect ... You can also click this if it not works</a>
